package tema7.ClasseCollections;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Test {

	public static void main(String[] args) {

		List<String> lista = new ArrayList<String>(Arrays.asList("Barcelona",
				"Valencia", "Madrid"));
		
		//metode de instancia de la interface List
		lista.addAll(Arrays.asList("Zaragoza", "Teruel"));

		//metode static de la classe Collections 
		Collections.addAll(lista, "Segovia","Toledo"); //varargs
		
		System.out.println(lista);

	}

}
